package com.t.bricks.bussiness.db.mapper.bill;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface BillMapper {

	/**
	 * 取总分类分组数据
	 * @param sCreator
	 * @return
	 */
	@Select("SELECT sType FROM ${BricksSafe}Bill WHERE sCreator = #{sCreator} GROUP BY sType")
	List<String> groupType(@Param("sCreator") String sCreator);

	/**
	 * 取总分类和名称分组数据
	 * @param sCreator
	 * @return
	 */
	@Select("SELECT sType, sName FROM ${BricksSafe}Bill WHERE sCreator = #{sCreator} GROUP BY sType, sName")
	List<Map<String, String>> groupTypeAndName(@Param("sCreator") String sCreator);
	
}
